<style>
    .upload-image {
        background: url('__CDN__/assets/addons/example/img/plus.png') no-repeat center center;
        background-size: 30px 30px;
        height: 30px;
        width: 30px;
        border: 1px solid #ccc;
    }
    .upload-images {
        background: url('__CDN__/assets/addons/example/img/plus.png') no-repeat center center;
        background-size: 30px 30px;
        height: 30px;
        width: 30px;
        border: 1px solid #ccc;
    }

    textarea.form-control {
        background: #eee;
    }
</style>



<style>
    .sbox{
        background: #fff;
        margin-bottom:30px;
        padding: 30px;
    }
    .pageTitle{
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom:15px;
    }
    .pageTitle strong{
        font-size: 16px;
        display: block;
        padding-left: 10px;
        position: relative;
    }
    .pageTitle strong:after{
        content: "";
        width: 3px;
        height: 15px;
        background: #577ae1;
        position: absolute;
        left: 0;
        top: 3px;

    }
    .pageTitle p{
        font-size: 16px;
        color: #333;
    }
    .sbox table{
        width:100%;
    }
    .sbox td{
        border: 1px solid #eee;
        padding: 10px;
        text-align: center;
    }
    .sbox td.bg{
        background: #f9f9f9;
    }
    .sbox th{
        background: #f9f9f9;
        height: 50px;
        text-align: center;
    }
    .tip{
        background: #fff;
        padding: 30px;
        padding-top: 0;
        font-size: 16px;
    }
    .tip span{
        font-size: 14px;
        color: #999;
    }
    .sbox1_con{
        display: flex;

    }
    .sbox1_con table{
        flex: 1;
    }
    .sbox1_con .ewm{
        display: none;
        width: 300px;
        margin-left:30px;
    }
    .sumit{
        display: none;
    }
    .sbox1_con .ewm.show{
        display: block;
    }
    .sbox1_con .ewm img{
        width: 200px;
        height: 200px;
        display: block;
        margin: 0 auto;
        margin-bottom: 15px;
        background: #eee;
    }
    .sbox1_con .ewm p{
        text-align: center;
        font-size: 14px;
        color: #666;
    }
    .sbox2{
        margin-bottom: 0;
    }
    .end{
        padding: 30px 0;
        text-align: center;
        background: #fff;
    }
</style>


<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="tbox">

        <div class="sbox sbox1">
            <div class="pageTitle">
                <strong>样品信息</strong>
                <p>数据单号：{$row.code}</p>
            </div>
            <div class="sbox1_con">
                <table>
                    <tr>
                        <td class="bg"><strong>受检单位</strong></td>
                        <td colspan="3">{$row.unit_name?? "/"}</td>
                    </tr>
                    <tr>
                        <td class="bg"><strong>受检单位地址</strong></td>
                        <td colspan="3">{$row.address?? "/"}</td>
                    </tr>
                    <tr>
                        <td class="bg"><strong>联系人</strong></td>
                        <td> {$row.name?? "/"}</td>
                        <td class="bg"><strong>联系电话</strong></td>
                        <td> {$row.phone?? "/"}</td>
                    </tr>
                    <tr>
                        <td class="bg"><strong>样品数量</strong></td>
                        <td> {$row.sample_num?? "/"}</td>
                        <td class="bg"><strong>样品类别</strong></td>
                        <td> {$row.sample_type?? "/"}</td>
                    </tr>
                    <tr>
                        <td class="bg"><strong>抽样日期</strong></td>
                        <td> {$row.smple_time_text?? "/"}</td>
                        <td class="bg"><strong>检测日期</strong></td>
                        <td> {$row.detection_time_text?? "/"}</td>
                    </tr>
                    <tr>
                </table>
                <div class="ewm {$row.status==2? 'show' : '' }">
                    <img src="{$row.ewm_url}" alt="" />
                    <p>手机扫描二维码查看检测报告</p>
                    <p><a href="{$row.h5path}" target="_blank">查看报告</a></p>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <ul class="row list-inline faupload-preview" id="p-image" data-listidx="0">
                        {foreach name="row.image" id="value"}
                        <li>
                            <a href="{$value}" data-url="{$value}" target="_blank" class="thumbnail"><img src="{$value}" onerror="this.src='/adminweb.php/ajax/icon?suffix=png';this.onerror=null;" class="img-responsive"></a>
                        </li>
                        {/foreach}
                    </ul>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('样品图片')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <ul class="row list-inline faupload-preview" id="p-yimages" data-listidx="0">
                        {foreach name="row.yimages" id="value"}
                        <li>
                            <a href="{$value}" data-url="{$value}" target="_blank" class="thumbnail"><img src="{$value}" onerror="this.src='/adminweb.php/ajax/icon?suffix=png';this.onerror=null;" class="img-responsive"></a>
                        </li>
                        {/foreach}
                    </ul>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('原始单据')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <ul class="row list-inline faupload-preview" id="p-simages" data-listidx="0">
                        {foreach name="row.simages" id="value"}
                        <li>
                            <a href="{$value}" data-url="{$value}" target="_blank" class="thumbnail"><img src="{$value}" onerror="this.src='/adminweb.php/ajax/icon?suffix=png';this.onerror=null;" class="img-responsive"></a>
                        </li>
                        {/foreach}
                    </ul>
                </div>
            </div>
        </div>
        <div class="sbox sbox2">
            <div class="pageTitle">
                <strong>检测结果（定性）</strong>
            </div>
            <table>
                <thead>
                <tr>
                    <th>样品名称</th>
                    <th>样品编号</th>
                    <th>检测项目</th>
                    <th>检测结果</th>
                    <th>检测方法</th>
                      <th>检出限</th>
                      <th>单位</th>
                    <th>备注</th>
                </tr>
                </thead>
                {foreach name="row.detection_json" id="value"}
                <tr>
                    <td>{$value.sample_name ?? "/"}</td>
                    <td>{$value.code?? "/"}</td>
                    <td>{$value.project_name?? "/"}</td>
                    <td>{$value.result?? "/"}</td>
                    <td>{$value.method_name?? "/"}</td>
                    <td>{$value.outmsg?? "/"}</td>
                    <td>{$value.unitmsg?? "/"}</td>
                    <td>{$value.remark?? "/"}</td>
                </tr>
                {/foreach}
            </table>
        </div>

        <div class="tip">
            <span>备注</span>
            <p>{$row.remark}</p>
        </div>
        <div class="end">
            <p>*** 报告结束 ***</p>
            <p>1.报告无快速检测专用章，或经涂改，以及复印报告未加盖红色快速检测专用章均视作无效;</p>
            <p>2.未经本公司批准，不得部分复制本报告;</p>
            <p>3.样品信息由客户提供，本报告检测结果仅对受检样品负责;</p>
            <p>4.不得擅自使用检测结果进行不当宣传;</p>
            <p>5.如果对检测结果有异议，请于收到报告之日起4小时内提出，逾期不予受理;</p>
            <p>6.本报告中的全部检测项目未取得资质认定，仅供科研、教学、企业内部质量控制、企业产品研发等目的用</p>
        </div>
    </div>
    <iframe src="{$row.url}" style="display: none;width: 100%;height: 100%" >

    </iframe>
    <div class=" sumit {$row.status==1 ? 'form-group layer-footer' : ''}" >
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed ">{:__('通过')}</button>
        </div>
    </div>
</form>
